
package com.sskj.jkzx.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.sskj.core.repository.GenericRepository;
import com.sskj.jkzx.domain.entity.quantity.OrgTypeQuantity;

public interface OrgTypeQuantityRepository
		extends GenericRepository<OrgTypeQuantity, String> {

	@Query(value = "select * from jkzx_org_type_quantity t order by t.created_time desc limit 1",
			nativeQuery = true)
	OrgTypeQuantity findLastOne();

	@Query(value = "select * from jkzx_org_type_quantity t where t.type=:type order by t.created_time desc limit 1",
			nativeQuery = true)
	OrgTypeQuantity findLastOneByType(@Param("type") String type);

}
